home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-04-09 | 8.7 KB | 317 lines | [TEXT/MPS ] |
- ;
- ; File: QD3DExtension.a
- ;
- ; Contains: QuickDraw 3D Plug-in Architecture Interface File.
- ;
- ; Version: Technology: Quickdraw 3D 1.5.4
- ; Release: QuickTime 3.0
- ;
- ; Copyright: © 1995-1998 by Apple Computer, Inc., all rights reserved.
- ;
- ; Bugs?: Please include the the file and version information (from above) with
- ; the problem description. Developers belonging to one of the Apple
- ; developer programs can submit bug reports to:
- ;
- ; devsupport@apple.com
- ;
- ;
- IF &TYPE('__QD3DEXTENSION__') = 'UNDEFINED' THEN
- __QD3DEXTENSION__ SET 1
-
- IF &TYPE('__QD3D__') = 'UNDEFINED' THEN
- include 'QD3D.a'
- ENDIF
- IF &TYPE('__QD3DERRORS__') = 'UNDEFINED' THEN
- include 'QD3DErrors.a'
- ENDIF
-
- ; ******************************************************************************
- ; ** **
- ; ** Constants **
- ; ** **
- ; ****************************************************************************
-
- IF TARGET_OS_MAC THEN
-
- kQ3XExtensionMacCreatorType EQU 'Q3XT'
- kQ3XExtensionMacFileType EQU 'shlb'
- ENDIF ; TARGET_OS_MAC
-
- ; ******************************************************************************
- ; ** **
- ; ** Object Method types **
- ; ** **
- ; ****************************************************************************
-
-
- kQ3XMethodTypeObjectClassVersion EQU 'vrsn'
- ; typedef unsigned long TQ3XObjectClassVersion
-
-
- kQ3XMethodTypeObjectClassRegister EQU 'rgst'
-
- kQ3XMethodTypeObjectClassReplace EQU 'rgrp'
-
- kQ3XMethodTypeObjectClassUnregister EQU 'unrg'
-
- kQ3XMethodTypeObjectNew EQU 'newo'
-
- kQ3XMethodTypeObjectDelete EQU 'dlte'
-
- kQ3XMethodTypeObjectDuplicate EQU 'dupl'
- ; ******************************************************************************
- ; ** **
- ; ** Object Hierarchy Registration **
- ; ** **
- ; ****************************************************************************
-
- ;
- ; * Q3XObjectHierarchy_RegisterClass
- ; *
- ; * Register an object class in the QuickDraw 3D hierarchy.
- ; *
- ; * parentType - an existing type in the hierarchy, or 0 to subclass
- ; * TQ3Object
- ; * objectType - the new object class type, used in the binary
- ; * metafile. This is assigned at run time and returned
- ; * to you.
- ; * objectName - the new object name, used in the text metafile
- ; * metaHandler - a TQ3XMetaHandler (may be NULL for some classes)
- ; * which returns non-virtual methods
- ; * virtualMetaHandler - a TQ3XMetaHandler (may be NULL as well) which returns
- ; * virtual methods a child would inherit
- ; * methodsSize - the size of the class data needed (see
- ; * GetClassPrivate calls below)
- ; * instanceSize - the size of the object instance data needed (see
- ; * GetPrivate calls below)
- ;
-
- ;
- ; extern TQ3XObjectClass Q3XObjectHierarchy_RegisterClass(TQ3ObjectType parentType, TQ3ObjectType *objectType, char *objectName, TQ3XMetaHandler metaHandler, TQ3XMetaHandler virtualMetaHandler, unsigned long methodsSize, unsigned long instanceSize)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectHierarchy_RegisterClass
- ENDIF
-
- ;
- ; * Q3XObjectHierarchy_UnregisterClass
- ; *
- ; * Returns kQ3Failure if the objectClass still has objects
- ; * around; the class remains registered.
- ;
-
- ;
- ; extern TQ3Status Q3XObjectHierarchy_UnregisterClass(TQ3XObjectClass objectClass)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectHierarchy_UnregisterClass
- ENDIF
-
- ;
- ; * Q3XObjectHierarchy_GetMethod
- ; *
- ; * For use in TQ3XObjectClassRegisterMethod call
- ;
-
- ;
- ; extern TQ3XFunctionPointer Q3XObjectClass_GetMethod(TQ3XObjectClass objectClass, TQ3XMethodType methodType)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectClass_GetMethod
- ENDIF
-
- ;
- ; * Q3XObjectHierarchy_NewObject
- ; *
- ; * To create a new object. Parameters is passed into the
- ; * TQ3XObjectNewMethod as the "parameters" parameter.
- ;
-
- ;
- ; extern TQ3Object Q3XObjectHierarchy_NewObject(TQ3XObjectClass objectClass, void *parameters)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectHierarchy_NewObject
- ENDIF
-
- ;
- ; * Q3XObjectClass_GetLeafType
- ; *
- ; * Return the leaf type of a class.
- ;
-
- ;
- ; extern TQ3ObjectType Q3XObjectClass_GetLeafType(TQ3XObjectClass objectClass)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectClass_GetLeafType
- ENDIF
-
- ;
- ; * Q3XObjectClass_GetVersion
- ; * This routine obtains the the version of a class, referenced by an
- ; * object class type. Functions for getting the type are in QD3D.h,
- ; * if you have the class name.
- ;
-
- ;
- ; extern TQ3Status Q3XObjectHierarchy_GetClassVersion(TQ3ObjectType objectClassType, TQ3XObjectClassVersion *version)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectHierarchy_GetClassVersion
- ENDIF
-
- ;
- ; * Q3XObjectClass_GetType
- ; *
- ; * This can be used to get the type, given a reference
- ; * to a class. This is most useful in the instance where you register a
- ; * an element/attribute and need to get the type. When you register an
- ; * element, QD3D will take the type you pass in and modify it (to avoid
- ; * namespace clashes). Many object system calls require an object type
- ; * so this API call allows you to get the type from the class referernce
- ; * that you will ordinarily store when you register the class.
- ;
-
- ;
- ; extern TQ3Status Q3XObjectClass_GetType(TQ3XObjectClass objectClass, TQ3ObjectType *theType)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectClass_GetType
- ENDIF
-
-
- ;
- ; extern TQ3XObjectClass Q3XObjectHierarchy_FindClassByType(TQ3ObjectType theType)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectHierarchy_FindClassByType
- ENDIF
-
-
-
- ;
- ; * Q3XObjectClass_GetPrivate
- ; *
- ; * Return a pointer to private instance data, a block of instanceSize bytes,
- ; * from the Q3XObjectHierarchy_RegisterClass call.
- ; *
- ; * If instanceSize was zero, NULL is always returned.
- ;
-
- ;
- ; extern void *Q3XObjectClass_GetPrivate(TQ3XObjectClass objectClass, TQ3Object targetObject)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObjectClass_GetPrivate
- ENDIF
-
- ;
- ; * Return the "TQ3XObjectClass" of an object
- ;
-
- ;
- ; extern TQ3XObjectClass Q3XObject_GetClass(TQ3Object object)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XObject_GetClass
- ENDIF
-
-
-
- ; ******************************************************************************
- ; ** **
- ; ** Shared Library Registration Entry Point **
- ; ** **
- ; ****************************************************************************
-
- TQ3XSharedLibraryInfo RECORD 0
- registerFunction ds.l 1 ; offset: $0 (0)
- sharedLibrary ds.l 1 ; offset: $4 (4)
- sizeof EQU * ; size: $8 (8)
- ENDR
- ;
- ; extern TQ3Status Q3XSharedLibrary_Register(TQ3XSharedLibraryInfo *sharedLibraryInfo)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XSharedLibrary_Register
- ENDIF
-
- ;
- ; extern TQ3Status Q3XSharedLibrary_Unregister(unsigned long sharedLibrary)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XSharedLibrary_Unregister
- ENDIF
-
-
- ; ******************************************************************************
- ; ** **
- ; ** Posting Errors **
- ; ** **
- ; ** You may only call these functions from within an extension **
- ; ** **
- ; ****************************************************************************
-
- ;
- ; * Q3XError_Post
- ; *
- ; * Post a QuickDraw 3D Error from an extension.
- ;
-
- ;
- ; extern void Q3XError_Post(TQ3Error error)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XError_Post
- ENDIF
-
- ;
- ; * Q3XWarning_Post
- ; *
- ; * Post a QuickDraw 3D Warning, from an extension. Note the warning code you
- ; * pass into this routine must already be defined in the table above.
- ;
-
- ;
- ; extern void Q3XWarning_Post(TQ3Warning warning)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XWarning_Post
- ENDIF
-
- ;
- ; * Q3XNotice_Post
- ; *
- ; * Post a QuickDraw 3D Notice, from an extension. Note the notice code you
- ; * pass into this routine must already be defined in the table above.
- ;
-
- ;
- ; extern void Q3XNotice_Post(TQ3Notice notice)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XNotice_Post
- ENDIF
-
-
- IF TARGET_OS_MAC THEN
- ;
- ; * Q3XMacintoshError_Post
- ; *
- ; * Post the QuickDraw 3D Error, kQ3ErrorMacintoshError, and the Macintosh
- ; * OSErr macOSErr. (Retrieved with Q3MacintoshError_Get)
- ;
-
- ;
- ; extern void Q3XMacintoshError_Post(OSErr macOSErr)
- ;
- IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
- IMPORT_CFM_FUNCTION Q3XMacintoshError_Post
- ENDIF
-
- ENDIF ; TARGET_OS_MAC
-
- ENDIF ; __QD3DEXTENSION__
-
-